﻿using Microsoft.EntityFrameworkCore;
using NPOI.SS.Formula.Functions;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace DFGK_WMS.Model.Models
{
    /// <summary>
    /// 盘点计划单
    /// </summary>
    [Index(nameof(OrderSn), IsUnique = true)]
    public partial class TStocktakingOrder
    {
        /// <summary>
        /// 盘点订单Id
        /// </summary>
        public int Id { get; set; }
        /// <summary>
        /// 仓位id//qiyong1
        /// </summary>
    
        public string  Name { get; set; }
        /// <summary>
        /// 倉位編碼
        /// </summary>
        public string OrderSn { get; set; }
        /// <summary>
        /// 库存明细id
        /// </summary>
        public int WarehouseId { get; set; }
        /// <summary>
        /// 仓库名称
        /// </summary>
        public string WarehouseCode { get; set; }
        /// <summary>
        /// 存放库位
        /// </summary>
        public string WarehouseName { get; set; }
        /// <summary>
        /// 库区Id
        /// </summary>
        public int? AreaId { get; set; }
        public string AreaCode { get; set; }
        /// <summary>
        /// 库区
        /// </summary>
        public string AreaName { get; set; }
        /// <summary>
        /// 盘点计划单id
        /// </summary>
        public long planId { get; set; }
        /// <summary>
        /// 存放库位描述
        /// </summary>
        public string storeLocationRemark { get; set; }
        /// <summary>
        /// 单据类型Id
        /// </summary>
        public int? BillType { get; set; }
        /// <summary>
        /// ERP单据类型编码
        /// </summary>
        public string Erpcode { get; set; }
        /// <summary>
        /// 单据状态：0-创建;1-提交;2-审核通过;3-作业中；4-已完成;5-强制完成;6-失效；7-异常
        /// </summary>
        public int Status { get; set; }
        /// <summary>
        /// 物料Id
        /// </summary>
        public int? MaterialId { get; set; }
        /// <summary>
        /// 物资名称
        /// </summary>
        public string MaterialName { get; set; }
        /// <summary>
        /// 批次号
        /// </summary>
        public string BatchNo { get; set; }
        /// <summary>
        /// 仓位id
        /// </summary>
        public int PlanType { get; set; }
        /// <summary>
        /// 盘点方法：0-全部盘点；10-不盘30天已盘点的库区；20-不盘15天已盘点的库区；30-不盘7天内已盘点的库区；
        /// </summary>
        public int StocktakeWay { get; set; }
        /// <summary>
        /// 单盘最大库位数
        /// </summary>
        public int? MaxLocationCount { get; set; }
        /// <summary>
        /// 盘点粒度：0-全部盘点；10-抽查盘点（5%库位）；20-抽查盘点（25%库位）；30-抽查盘点（50%库位）
        /// 
        /// </summary>
        public int? Granularity { get; set; }
        /// <summary>
        /// 库存数量
        /// </summary>
        public int CellCount { get; set; }
        /// <summary>
        /// 完成数量/实际盘点数量
        /// </summary>
        public int FinishedCount { get; set; }
        /// <summary>
        /// 仓位id
        /// </summary>
        public int? TouchTimes { get; set; }
        public DateTime? TouchStartDate { get; set; }
        public DateTime? TouchEndDate { get; set; }
        /// <summary>
        /// 循环次数
        /// </summary>
        public int LoopTimes { get; set; }
        /// <summary>
        /// 关联盘点计划单id
        /// </summary>
        public int PriorityLevel { get; set; }
        /// <summary>
        /// 盘点执行时间
        /// </summary>
        public DateTime? ExecDate { get; set; }
        /// <summary>
        /// 盘点结果
        /// </summary>
        public string Remark { get; set; }
        /// <summary>
        /// 监盘人id
        /// </summary>
        public int? CreateUserId { get; set; }
        /// <summary>
        /// 监盘人名称
        /// </summary>
        public string CreateUserName { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateDate { get; set; }
        /// <summary>
        /// 修改人Id
        /// </summary>
        public int? ModifyUserId { get; set; }
        /// <summary>
        /// 修改人
        /// </summary>
        public string ModifyUserName { get; set; }
        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? ModifyDate { get; set; }
        /// <summary>
        /// 提交时间
        /// </summary>
        public DateTime? SubmitDate { get; set; }
        /// <summary>
        /// 提交人Id
        /// </summary>
        public int? SubmitUserId { get; set; }
        /// <summary>
        /// 提交人
        /// </summary>
        public string SubmitUserName { get; set; }
        /// <summary>
        /// 审核时间
        /// </summary>
        public DateTime? AuditDate { get; set; }
        /// <summary>
        /// 审核人Id
        /// </summary>
        public int? AuditUserId { get; set; }
        /// <summary>
        /// 审核人
        /// </summary>
        public string AuditUserName { get; set; }
        /// <summary>
        /// 新增归属部门名称
        /// </summary>
        public string deptName { get; set; }
        /// <summary>
        /// 新增物资编码
        /// </summary>
        public string materialCode { get; set; }
        /// <summary>
        /// 新增规格型号
        /// </summary>
        public string materialNorms { get; set; }
        /// <summary>
        /// 盈亏数量
        /// </summary>
        public decimal? MyProperty { get; set; }
        /// <summary>
        /// 质量状态
        /// </summary>
        public int qualityStatus { get; set; }
    }
}
